package com.atqinke.designpattern.behavioraltype.observer;


/**
 * @BelongsProject: BasicConnection
 * @BelongsPackage: com.atqinke.designpattern.behavioraltype.observer
 * @Author: NieHk
 * @CreateTime: 2022-08-29  12:31
 * @Description: 具体观察者类
 * @Version: 1.0
 */
public class User implements Observer {
    //用户名
    private String name;

    public User(String name) {
        this.name = name;
    }

    @Override
    public void update(String message) {
        System.out.println(name + "-" + message);
    }
}
